<template>
    <div class="countDown">
        <div class="content">

        <p>操作提示：</p>
        <p>未输入账号密码{{content}}...秒后跳到登录页</p>
        <router-link tag="a" to='/Admin/login'>不跳转点击此处跳转</router-link>

        </div>
    </div>
</template>

<script>
//倒计时组件返回登录页组件

export default {
    name:'countDown',
    data(){
        return{
            content:3
        }
    },
    mounted(){
        let timer = setInterval( () => {
            this.content--
            if(this.content === 0){
                this.$router.replace('/Admin/login').catch(err => err)
                clearInterval(timer)
            }
        }
        ,1000)

    }
}
</script>

<style scoped>
.countDown{
    position: fixed;
    width: 100%;
    height: 100%;
    background: floralwhite;
    z-index: 1;
}
.content{
   position: fixed;
   z-index: 99999;
   width: 300px;
   height: 200px;
   left: 35%;
   top: 30%;
   padding: 20px;
   border-radius: 10px;
   background: #ffffff;
   border: 1px solid #d64848;
}
.content p{
    font-weight: bold;
}
.content p:nth-child(1){
    line-height: 60px;
    font-size: 30px;
    border-bottom: 1px solid rgb(180, 175, 185);
}
.content p:nth-child(2){
    line-height: 50px;
}
.content a{
    line-height: 30px;
}
</style>